package jp.co.cos.ittrick.channel.controller.client;

import jp.co.cos.ittrick.channel.service.PreService;

import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;

public class DeletePreController extends Controller {

    private PreService preService;

    public DeletePreController() {
        preService = new PreService();
    }

    @Override
    public Navigation run() throws Exception {

        // リクエストパラメータ
        String pre = asString("pre");

        // Insert
        preService.delete(Integer.valueOf(pre));

        response.setCharacterEncoding("utf-8");
        response.setContentType("text/html");
        response.getWriter().println("0");
        response.flushBuffer();

        return null;
    }
}
